using System;
using System.Collections.Generic;
using System.Runtime.CompilerServices;
using System.Threading;
using Tool.Model;
using Tool.Utilty;

namespace Tool.BaseClass
{
	public class GClass52
	{
		[CompilerGenerated]
		private sealed class Class0
		{
			public int UrlId;

			public bool method_0(GClass32 gclass32_0)
			{
				return gclass32_0.UrlId.Equals(this.UrlId);
			}
		}

		[CompilerGenerated]
		private sealed class Class1
		{
			public GClass32 model;

			public bool method_0(GClass32 gclass32_0)
			{
				return gclass32_0.UrlId.Equals(this.model.UrlId);
			}
		}

		public static void smethod_0(int int_0)
		{
			GClass52.Class0 @class = new GClass52.Class0();
			@class.UrlId = int_0;
			List<GClass32> list = GClass28.smethod_5();
			GClass32 gClass = list.Find(new Predicate<GClass32>(@class.method_0));
			if (string.IsNullOrEmpty(gClass.UrlEncoding))
			{
				Thread thread = new Thread(new ParameterizedThreadStart(GClass52.smethod_1));
				thread.Start(gClass);
			}
		}

		private static void smethod_1(object object_0)
		{
			GClass52.Class1 @class = new GClass52.Class1();
			@class.model = (GClass32)object_0;
			string urlEncoding = GClass38.smethod_0(@class.model.UrlHref, GClass0.UserAgent);
			List<GClass32> list = GClass28.smethod_5();
			GClass32 gClass = list.Find(new Predicate<GClass32>(@class.method_0));
			if (gClass != null && @class.model.UrlHref == gClass.UrlHref)
			{
				gClass.UrlEncoding = urlEncoding;
			}
		}
	}
}
